﻿#pragma once

#include "Typedef.h"
#include <string>
#include <vector>
// CLogDlg 对话框

class CLogDlg : public CDialogEx
{
	DECLARE_DYNAMIC(CLogDlg)

public:
	CLogDlg(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CLogDlg();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DLG_LOG };
#endif

protected:
	virtual BOOL OnInitDialog();
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	CListCtrl m_list;
	std::vector<LOG_PACKAGE>m_logBuffer;
public:
	afx_msg LRESULT RecvAndDisplayLog(WPARAM wparam, LPARAM lparam);

	afx_msg void OnLvnItemchangedLstLog(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMCustomdrawLstLog(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMDblclkLstLog(NMHDR *pNMHDR, LRESULT *pResult);
};
